{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{\"name\":\"DEV\",\"maskPublisherPath\":\"/data/puma1/scratch/malard/mask/\",\"cacheCdfPath\":\"/data/puma1/scratch/malard/export/\",\"pointCdfPath\":\"/data/snail1/scratch/malard/points/\"}\n",
      "[{\"name\":\"antarctic\"},{\"name\":\"mtngla\"},{\"name\":\"mtnglaT2\"},{\"name\":\"mtngla_single\"},{\"name\":\"mtngla_test\"},{\"name\":\"srtm_single\"},{\"name\":\"tempstore\"},{\"name\":\"test\"}]\n"
     ]
    }
   ],
   "source": [
    "import DataSetQuery\n",
    "import datetime\n",
    "\n",
    "\n",
    "environmentName = 'DEV'\n",
    "#Sets the URL of the Malard ServiceGateway.\n",
    "query = DataSetQuery.DataSetQuery('http://localhost:9000',environmentName)\n",
    "\n",
    "print(query.getEnvironment(environmentName))\n",
    "\n",
    "#determines the databases that store multiple datasets \n",
    "print(query.getParentDataSets())\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{\"name\":\"tdx\"}]\n"
     ]
    }
   ],
   "source": [
    "#retrieve the data sets for a given parent\n",
    "print(query.getDataSets('antarctic'))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2010-12-01 00:45:42\n",
      "2016-12-31 23:22:35\n",
      "{\"gridCellMinX\":-2700000,\"gridCellMaxX\":2700000,\"gridCellMinY\":-2200000,\"gridCellMaxY\":2200000,\"minTime\":1291164342,\"maxTime\":1483226555,\"totalPoints\":9540724423,\"numberOfShards\":63506}\n"
     ]
    }
   ],
   "source": [
    "\n",
    "from datetime import datetime\n",
    "\n",
    "\n",
    "import json\n",
    "\n",
    "box = query.getDataSetBoundingBox( 'antarctic','tdx' )\n",
    "data = json.loads(box)\n",
    "\n",
    "startDate = datetime.fromtimestamp(data['minTime'])\n",
    "endDate = datetime.fromtimestamp(data['maxTime'])\n",
    "\n",
    "print(startDate)\n",
    "print(endDate)\n",
    "\n",
    "print(box)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1262304000.0\n",
      "1264982399.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-1\n",
      "1264982400.0\n",
      "1267401599.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-2\n",
      "1267401600.0\n",
      "1270076399.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-3\n",
      "1270076400.0\n",
      "1272668399.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-4\n",
      "1272668400.0\n",
      "1275346799.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-5\n",
      "1275346800.0\n",
      "1277938799.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-6\n",
      "1277938800.0\n",
      "1280617199.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-7\n",
      "1280617200.0\n",
      "1283295599.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-8\n",
      "1283295600.0\n",
      "1285887599.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-9\n",
      "1285887600.0\n",
      "1288569599.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-10\n",
      "1288569600.0\n",
      "1291161599.0\n",
      "Error: Empty resultset.\n",
      "Thwaites has no results for: 2010-11\n",
      "1291161600.0\n",
      "1293839999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1661130414.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2010-12.nc\n",
      "1293840000.0\n",
      "1296518399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_46184679.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-1.nc\n",
      "1296518400.0\n",
      "1298937599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1906468861.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-2.nc\n",
      "1298937600.0\n",
      "1301612399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1692986975.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-3.nc\n",
      "1301612400.0\n",
      "1304204399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1160892738.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-4.nc\n",
      "1304204400.0\n",
      "1306882799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-425176580.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-5.nc\n",
      "1306882800.0\n",
      "1309474799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-24306174.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-6.nc\n",
      "1309474800.0\n",
      "1312153199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1186632526.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-7.nc\n",
      "1312153200.0\n",
      "1314831599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1598674311.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-8.nc\n",
      "1314831600.0\n",
      "1317423599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1368987038.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-9.nc\n",
      "1317423600.0\n",
      "1320105599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-444112241.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-10.nc\n",
      "1320105600.0\n",
      "1322697599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1612589086.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-11.nc\n",
      "1322697600.0\n",
      "1325375999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_166496092.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2011-12.nc\n",
      "1325376000.0\n",
      "1328054399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_528541884.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-1.nc\n",
      "1328054400.0\n",
      "1330559999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1887564595.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-2.nc\n",
      "1330560000.0\n",
      "1333234799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1465002497.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-3.nc\n",
      "1333234800.0\n",
      "1335826799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-673569651.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-4.nc\n",
      "1335826800.0\n",
      "1338505199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-388620825.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-5.nc\n",
      "1338505200.0\n",
      "1341097199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_891361250.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-6.nc\n",
      "1341097200.0\n",
      "1343775599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1327866279.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-7.nc\n",
      "1343775600.0\n",
      "1346453999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1941850596.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-8.nc\n",
      "1346454000.0\n",
      "1349045999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1142822615.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-9.nc\n",
      "1349046000.0\n",
      "1351727999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_824061935.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-10.nc\n",
      "1351728000.0\n",
      "1354319999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-347792169.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-11.nc\n",
      "1354320000.0\n",
      "1356998399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1632986919.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2012-12.nc\n",
      "1356998400.0\n",
      "1359676799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_39348796.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-1.nc\n",
      "1359676800.0\n",
      "1362095999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_920777859.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-2.nc\n",
      "1362096000.0\n",
      "1364770799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_954543583.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-3.nc\n",
      "1364770800.0\n",
      "1367362799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1732366914.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-4.nc\n",
      "1367362800.0\n",
      "1370041199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_570040562.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-5.nc\n",
      "1370041200.0\n",
      "1372633199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-637564371.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-6.nc\n",
      "1372633200.0\n",
      "1375311599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2067956348.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-7.nc\n",
      "1375311600.0\n",
      "1377989999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_824901383.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-8.nc\n",
      "1377990000.0\n",
      "1380581999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2091849470.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-9.nc\n",
      "1380582000.0\n",
      "1383263999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_181355833.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-10.nc\n",
      "1383264000.0\n",
      "1385855999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-530760382.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-11.nc\n",
      "1385856000.0\n",
      "1388534399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-245811556.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2013-12.nc\n",
      "1388534400.0\n",
      "1391212799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-667836313.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-1.nc\n",
      "1391212800.0\n",
      "1393631999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_318287779.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-2.nc\n",
      "1393632000.0\n",
      "1396306799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-577048993.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-3.nc\n",
      "1396306800.0\n",
      "1398898799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1488301406.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-4.nc\n",
      "1398898800.0\n",
      "1401577199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1099008889.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-5.nc\n",
      "1401577200.0\n",
      "1404169199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1081620510.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-6.nc\n",
      "1404169200.0\n",
      "1406847599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-965004569.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-7.nc\n",
      "1406847600.0\n",
      "1409525999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_60245852.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-8.nc\n",
      "1409526000.0\n",
      "1412117999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1252054110.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-9.nc\n",
      "1412118000.0\n",
      "1414799999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1925169543.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-10.nc\n",
      "1414800000.0\n",
      "1417391999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-379212628.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-11.nc\n",
      "1417392000.0\n",
      "1420070399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1826992775.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2014-12.nc\n",
      "1420070400.0\n",
      "1422748799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-762019598.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-1.nc\n",
      "1422748800.0\n",
      "1425167999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-125768360.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-2.nc\n",
      "1425168000.0\n",
      "1427842799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1338327265.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-3.nc\n",
      "1427842800.0\n",
      "1430434799.0\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data/puma1/scratch/malard/export/antarctic_tdx_-662509811.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-4.nc\n",
      "1430434800.0\n",
      "1433113199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-476505657.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-5.nc\n",
      "1433113200.0\n",
      "1435705199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1364532077.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-6.nc\n",
      "1435705200.0\n",
      "1438383599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1927599759.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-7.nc\n",
      "1438383600.0\n",
      "1441061999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1018907239.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-8.nc\n",
      "1441062000.0\n",
      "1443653999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-188697694.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-9.nc\n",
      "1443654000.0\n",
      "1446335999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2111515015.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-10.nc\n",
      "1446336000.0\n",
      "1448927999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1471336066.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-11.nc\n",
      "1448928000.0\n",
      "1451606399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1654279015.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2015-12.nc\n",
      "1451606400.0\n",
      "1454284799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_877899505.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-1.nc\n",
      "1454284800.0\n",
      "1456790399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1263603304.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-2.nc\n",
      "1456790400.0\n",
      "1459465199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1312003766.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-3.nc\n",
      "1459465200.0\n",
      "1462057199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-571272051.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-4.nc\n",
      "1462057200.0\n",
      "1464735599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_791668519.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-5.nc\n",
      "1464735600.0\n",
      "1467327599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2118974466.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-6.nc\n",
      "1467327600.0\n",
      "1470005999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-917747289.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-7.nc\n",
      "1470006000.0\n",
      "1472684399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2039269692.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-8.nc\n",
      "1472684400.0\n",
      "1475276399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1854827198.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-9.nc\n",
      "1475276400.0\n",
      "1477958399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2071582001.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-10.nc\n",
      "1477958400.0\n",
      "1480550399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1974883330.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-11.nc\n",
      "1480550400.0\n",
      "1483228799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-292737561.nc\n",
      "/data/puma1/scratch/malard/export/Thwaites_2016-12.nc\n",
      "1262304000.0\n",
      "1264982399.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-1\n",
      "1264982400.0\n",
      "1267401599.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-2\n",
      "1267401600.0\n",
      "1270076399.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-3\n",
      "1270076400.0\n",
      "1272668399.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-4\n",
      "1272668400.0\n",
      "1275346799.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-5\n",
      "1275346800.0\n",
      "1277938799.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-6\n",
      "1277938800.0\n",
      "1280617199.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-7\n",
      "1280617200.0\n",
      "1283295599.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-8\n",
      "1283295600.0\n",
      "1285887599.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-9\n",
      "1285887600.0\n",
      "1288569599.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-10\n",
      "1288569600.0\n",
      "1291161599.0\n",
      "Error: Empty resultset.\n",
      "Amery has no results for: 2010-11\n",
      "1291161600.0\n",
      "1293839999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_841709837.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2010-12.nc\n",
      "1293840000.0\n",
      "1296518399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1745942366.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-1.nc\n",
      "1296518400.0\n",
      "1298937599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_596371390.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-2.nc\n",
      "1298937600.0\n",
      "1301612399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-99140070.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-3.nc\n",
      "1301612400.0\n",
      "1304204399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-631234307.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-4.nc\n",
      "1304204400.0\n",
      "1306882799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2077663671.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-5.nc\n",
      "1306882800.0\n",
      "1309474799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1816433219.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-6.nc\n",
      "1309474800.0\n",
      "1312153199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1316207725.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-7.nc\n",
      "1312153200.0\n",
      "1314831599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-193452734.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-8.nc\n",
      "1314831600.0\n",
      "1317423599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1133853213.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-9.nc\n",
      "1317423600.0\n",
      "1320105599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2058728010.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-10.nc\n",
      "1320105600.0\n",
      "1322697599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_890251165.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-11.nc\n",
      "1322697600.0\n",
      "1325375999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1625630953.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2011-12.nc\n",
      "1325376000.0\n",
      "1328054399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1263585161.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-1.nc\n",
      "1328054400.0\n",
      "1330559999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_95437550.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-2.nc\n",
      "1330560000.0\n",
      "1333234799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1037837754.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-3.nc\n",
      "1333234800.0\n",
      "1335826799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1829270600.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-4.nc\n",
      "1335826800.0\n",
      "1338505199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2114219426.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-5.nc\n",
      "1338505200.0\n",
      "1341097199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-900765795.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-6.nc\n",
      "1341097200.0\n",
      "1343775599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-464260766.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-7.nc\n",
      "1343775600.0\n",
      "1346453999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_560989655.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-8.nc\n",
      "1346454000.0\n",
      "1349045999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-649304430.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-9.nc\n",
      "1349046000.0\n",
      "1351727999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-968065110.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-10.nc\n",
      "1351728000.0\n",
      "1354319999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2139919214.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-11.nc\n",
      "1354320000.0\n",
      "1356998399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-159140126.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2012-12.nc\n",
      "1356998400.0\n",
      "1359676799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1752778249.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-1.nc\n",
      "1359676800.0\n",
      "1362095999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-871349186.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-2.nc\n",
      "1362096000.0\n",
      "1364770799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-837583462.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-3.nc\n",
      "1364770800.0\n",
      "1367362799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-59760131.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-4.nc\n",
      "1367362800.0\n",
      "1370041199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1222086483.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-5.nc\n",
      "1370041200.0\n",
      "1372633199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1865275880.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-6.nc\n",
      "1372633200.0\n",
      "1375311599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_275829303.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-7.nc\n",
      "1375311600.0\n",
      "1377989999.0\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data/puma1/scratch/malard/export/antarctic_tdx_-967225662.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-8.nc\n",
      "1377990000.0\n",
      "1380581999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_410990781.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-9.nc\n",
      "1380582000.0\n",
      "1383263999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1610771212.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-10.nc\n",
      "1383264000.0\n",
      "1385855999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1972079869.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-11.nc\n",
      "1385856000.0\n",
      "1388534399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2037938601.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2013-12.nc\n",
      "1388534400.0\n",
      "1391212799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1835003938.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-1.nc\n",
      "1391212800.0\n",
      "1393631999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1473839266.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-2.nc\n",
      "1393632000.0\n",
      "1396306799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1925791258.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-3.nc\n",
      "1396306800.0\n",
      "1398898799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1014538845.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-4.nc\n",
      "1398898800.0\n",
      "1401577199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1403831362.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-5.nc\n",
      "1401577200.0\n",
      "1404169199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1421219741.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-6.nc\n",
      "1404169200.0\n",
      "1406847599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1537835682.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-7.nc\n",
      "1406847600.0\n",
      "1409525999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1731881193.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-8.nc\n",
      "1409526000.0\n",
      "1412117999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1250786141.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-9.nc\n",
      "1412118000.0\n",
      "1414799999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_577670708.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-10.nc\n",
      "1414800000.0\n",
      "1417391999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2123627623.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-11.nc\n",
      "1417392000.0\n",
      "1420070399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_34865730.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2014-12.nc\n",
      "1420070400.0\n",
      "1422748799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1740820653.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-1.nc\n",
      "1422748800.0\n",
      "1425167999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1917895405.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-2.nc\n",
      "1425168000.0\n",
      "1427842799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1164512986.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-3.nc\n",
      "1427842800.0\n",
      "1430434799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1840330440.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-4.nc\n",
      "1430434800.0\n",
      "1433113199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2026334594.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-5.nc\n",
      "1433113200.0\n",
      "1435705199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-427594968.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-6.nc\n",
      "1435705200.0\n",
      "1438383599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_575240492.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-7.nc\n",
      "1438383600.0\n",
      "1441061999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-773219806.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-8.nc\n",
      "1441062000.0\n",
      "1443653999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1980824739.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-9.nc\n",
      "1443654000.0\n",
      "1446335999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_391325236.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-10.nc\n",
      "1446336000.0\n",
      "1448927999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-320790979.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-11.nc\n",
      "1448928000.0\n",
      "1451606399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-137848030.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2015-12.nc\n",
      "1451606400.0\n",
      "1454284799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-914227540.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-1.nc\n",
      "1454284800.0\n",
      "1456790399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-528523741.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-2.nc\n",
      "1456790400.0\n",
      "1459465199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1190836485.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-3.nc\n",
      "1459465200.0\n",
      "1462057199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1931568200.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-4.nc\n",
      "1462057200.0\n",
      "1464735599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1000458526.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-5.nc\n",
      "1464735600.0\n",
      "1467327599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_326847421.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-6.nc\n",
      "1467327600.0\n",
      "1470005999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1585092962.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-7.nc\n",
      "1470006000.0\n",
      "1472684399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_247142647.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-8.nc\n",
      "1472684400.0\n",
      "1475276399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_648013053.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-9.nc\n",
      "1475276400.0\n",
      "1477958399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_431258250.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-10.nc\n",
      "1477958400.0\n",
      "1480550399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_182756285.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-11.nc\n",
      "1480550400.0\n",
      "1483228799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2084864606.nc\n",
      "/data/puma1/scratch/malard/export/Amery_2016-12.nc\n",
      "1262304000.0\n",
      "1264982399.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-1\n",
      "1264982400.0\n",
      "1267401599.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-2\n",
      "1267401600.0\n",
      "1270076399.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-3\n",
      "1270076400.0\n",
      "1272668399.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-4\n",
      "1272668400.0\n",
      "1275346799.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-5\n",
      "1275346800.0\n",
      "1277938799.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-6\n",
      "1277938800.0\n",
      "1280617199.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-7\n",
      "1280617200.0\n",
      "1283295599.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-8\n",
      "1283295600.0\n",
      "1285887599.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-9\n",
      "1285887600.0\n",
      "1288569599.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-10\n",
      "1288569600.0\n",
      "1291161599.0\n",
      "Error: Empty resultset.\n",
      "Cook has no results for: 2010-11\n",
      "1291161600.0\n",
      "1293839999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_854555697.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2010-12.nc\n",
      "1293840000.0\n",
      "1296518399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1733096506.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-1.nc\n",
      "1296518400.0\n",
      "1298937599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_609217250.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-2.nc\n",
      "1298937600.0\n",
      "1301612399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-86294210.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-3.nc\n",
      "1301612400.0\n",
      "1304204399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-618388447.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-4.nc\n",
      "1304204400.0\n",
      "1306882799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2090509531.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-5.nc\n",
      "1306882800.0\n",
      "1309474799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1803587359.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-6.nc\n",
      "1309474800.0\n",
      "1312153199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1329053585.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-7.nc\n",
      "1312153200.0\n",
      "1314831599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-180606874.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-8.nc\n",
      "1314831600.0\n",
      "1317423599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1146699073.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-9.nc\n",
      "1317423600.0\n",
      "1320105599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2071573870.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-10.nc\n",
      "1320105600.0\n",
      "1322697599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_903097025.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-11.nc\n",
      "1322697600.0\n",
      "1325375999.0\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1612785093.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2011-12.nc\n",
      "1325376000.0\n",
      "1328054399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1250739301.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-1.nc\n",
      "1328054400.0\n",
      "1330559999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_108283410.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-2.nc\n",
      "1330560000.0\n",
      "1333234799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1050683614.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-3.nc\n",
      "1333234800.0\n",
      "1335826799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1842116460.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-4.nc\n",
      "1335826800.0\n",
      "1338505199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2127065286.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-5.nc\n",
      "1338505200.0\n",
      "1341097199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-887919935.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-6.nc\n",
      "1341097200.0\n",
      "1343775599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-451414906.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-7.nc\n",
      "1343775600.0\n",
      "1346453999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_573835515.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-8.nc\n",
      "1346454000.0\n",
      "1349045999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-636458570.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-9.nc\n",
      "1349046000.0\n",
      "1351727999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-955219250.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-10.nc\n",
      "1351728000.0\n",
      "1354319999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2127073354.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-11.nc\n",
      "1354320000.0\n",
      "1356998399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-146294266.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2012-12.nc\n",
      "1356998400.0\n",
      "1359676799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1739932389.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-1.nc\n",
      "1359676800.0\n",
      "1362095999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-858503326.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-2.nc\n",
      "1362096000.0\n",
      "1364770799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-824737602.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-3.nc\n",
      "1364770800.0\n",
      "1367362799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-46914271.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-4.nc\n",
      "1367362800.0\n",
      "1370041199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1209240623.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-5.nc\n",
      "1370041200.0\n",
      "1372633199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1878121740.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-6.nc\n",
      "1372633200.0\n",
      "1375311599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_288675163.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-7.nc\n",
      "1375311600.0\n",
      "1377989999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-954379802.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-8.nc\n",
      "1377990000.0\n",
      "1380581999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_423836641.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-9.nc\n",
      "1380582000.0\n",
      "1383263999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1597925352.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-10.nc\n",
      "1383264000.0\n",
      "1385855999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1984925729.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-11.nc\n",
      "1385856000.0\n",
      "1388534399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2025092741.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2013-12.nc\n",
      "1388534400.0\n",
      "1391212799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1847849798.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-1.nc\n",
      "1391212800.0\n",
      "1393631999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1460993406.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-2.nc\n",
      "1393632000.0\n",
      "1396306799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1938637118.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-3.nc\n",
      "1396306800.0\n",
      "1398898799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1027384705.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-4.nc\n",
      "1398898800.0\n",
      "1401577199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1416677222.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-5.nc\n",
      "1401577200.0\n",
      "1404169199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1434065601.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-6.nc\n",
      "1404169200.0\n",
      "1406847599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1550681542.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-7.nc\n",
      "1406847600.0\n",
      "1409525999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1719035333.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-8.nc\n",
      "1409526000.0\n",
      "1412117999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1263632001.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-9.nc\n",
      "1412118000.0\n",
      "1414799999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_590516568.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-10.nc\n",
      "1414800000.0\n",
      "1417391999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2136473483.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-11.nc\n",
      "1417392000.0\n",
      "1420070399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_47711590.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2014-12.nc\n",
      "1420070400.0\n",
      "1422748799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1753666513.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-1.nc\n",
      "1422748800.0\n",
      "1425167999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1905049545.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-2.nc\n",
      "1425168000.0\n",
      "1427842799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1177358846.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-3.nc\n",
      "1427842800.0\n",
      "1430434799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1853176300.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-4.nc\n",
      "1430434800.0\n",
      "1433113199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2039180454.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-5.nc\n",
      "1433113200.0\n",
      "1435705199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-414749108.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-6.nc\n",
      "1435705200.0\n",
      "1438383599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_588086352.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-7.nc\n",
      "1438383600.0\n",
      "1441061999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-760373946.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-8.nc\n",
      "1441062000.0\n",
      "1443653999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1967978879.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-9.nc\n",
      "1443654000.0\n",
      "1446335999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_404171096.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-10.nc\n",
      "1446336000.0\n",
      "1448927999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-307945119.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-11.nc\n",
      "1448928000.0\n",
      "1451606399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-125002170.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2015-12.nc\n",
      "1451606400.0\n",
      "1454284799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-901381680.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-1.nc\n",
      "1454284800.0\n",
      "1456790399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-515677881.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-2.nc\n",
      "1456790400.0\n",
      "1459465199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1203682345.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-3.nc\n",
      "1459465200.0\n",
      "1462057199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1944414060.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-4.nc\n",
      "1462057200.0\n",
      "1464735599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-987612666.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-5.nc\n",
      "1464735600.0\n",
      "1467327599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_339693281.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-6.nc\n",
      "1467327600.0\n",
      "1470005999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1597938822.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-7.nc\n",
      "1470006000.0\n",
      "1472684399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_259988507.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-8.nc\n",
      "1472684400.0\n",
      "1475276399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_660858913.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-9.nc\n",
      "1475276400.0\n",
      "1477958399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_444104110.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-10.nc\n",
      "1477958400.0\n",
      "1480550399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_195602145.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-11.nc\n",
      "1480550400.0\n",
      "1483228799.0\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2072018746.nc\n",
      "/data/puma1/scratch/malard/export/Cook_2016-12.nc\n",
      "1262304000.0\n",
      "1264982399.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-1\n",
      "1264982400.0\n",
      "1267401599.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-2\n",
      "1267401600.0\n",
      "1270076399.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-3\n",
      "1270076400.0\n",
      "1272668399.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-4\n",
      "1272668400.0\n",
      "1275346799.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-5\n",
      "1275346800.0\n",
      "1277938799.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-6\n",
      "1277938800.0\n",
      "1280617199.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-7\n",
      "1280617200.0\n",
      "1283295599.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-8\n",
      "1283295600.0\n",
      "1285887599.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-9\n",
      "1285887600.0\n",
      "1288569599.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-10\n",
      "1288569600.0\n",
      "1291161599.0\n",
      "Error: Empty resultset.\n",
      "Siple has no results for: 2010-11\n",
      "1291161600.0\n",
      "1293839999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-405027839.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2010-12.nc\n",
      "1293840000.0\n",
      "1296518399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1302287254.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-1.nc\n",
      "1296518400.0\n",
      "1298937599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-650366286.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-2.nc\n",
      "1298937600.0\n",
      "1301612399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1345877746.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-3.nc\n",
      "1301612400.0\n",
      "1304204399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1877971983.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-4.nc\n",
      "1304204400.0\n",
      "1306882799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_830925995.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-5.nc\n",
      "1306882800.0\n",
      "1309474799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1231796401.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-6.nc\n",
      "1309474800.0\n",
      "1312153199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_69470049.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-7.nc\n",
      "1312153200.0\n",
      "1314831599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1440190410.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-8.nc\n",
      "1314831600.0\n",
      "1317423599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-112884463.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-9.nc\n",
      "1317423600.0\n",
      "1320105599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_811990334.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-10.nc\n",
      "1320105600.0\n",
      "1322697599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-356486511.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-11.nc\n",
      "1322697600.0\n",
      "1325375999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1422598667.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2011-12.nc\n",
      "1325376000.0\n",
      "1328054399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1784644459.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-1.nc\n",
      "1328054400.0\n",
      "1330559999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1151300126.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-2.nc\n",
      "1330560000.0\n",
      "1333234799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-208899922.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-3.nc\n",
      "1333234800.0\n",
      "1335826799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_582532924.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-4.nc\n",
      "1335826800.0\n",
      "1338505199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_867481750.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-5.nc\n",
      "1338505200.0\n",
      "1341097199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2147463825.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-6.nc\n",
      "1341097200.0\n",
      "1343775599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1710998442.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-7.nc\n",
      "1343775600.0\n",
      "1346453999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-685748021.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-8.nc\n",
      "1346454000.0\n",
      "1349045999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1896042106.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-9.nc\n",
      "1349046000.0\n",
      "1351727999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2080164510.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-10.nc\n",
      "1351728000.0\n",
      "1354319999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_908310406.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-11.nc\n",
      "1354320000.0\n",
      "1356998399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1405877802.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2012-12.nc\n",
      "1356998400.0\n",
      "1359676799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1295451371.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-1.nc\n",
      "1359676800.0\n",
      "1362095999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2118086862.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-2.nc\n",
      "1362096000.0\n",
      "1364770799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2084321138.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-3.nc\n",
      "1364770800.0\n",
      "1367362799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1306497807.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-4.nc\n",
      "1367362800.0\n",
      "1370041199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1826143137.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-5.nc\n",
      "1370041200.0\n",
      "1372633199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_618538204.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-6.nc\n",
      "1372633200.0\n",
      "1375311599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-970908373.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-7.nc\n",
      "1375311600.0\n",
      "1377989999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2081003958.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-8.nc\n",
      "1377990000.0\n",
      "1380581999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-835746895.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-9.nc\n",
      "1380582000.0\n",
      "1383263999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1437458408.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-10.nc\n",
      "1383264000.0\n",
      "1385855999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_725342193.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-11.nc\n",
      "1385856000.0\n",
      "1388534399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1010291019.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2013-12.nc\n",
      "1388534400.0\n",
      "1391212799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_588266262.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-1.nc\n",
      "1391212800.0\n",
      "1393631999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1574390354.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-2.nc\n",
      "1393632000.0\n",
      "1396306799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_679053582.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-3.nc\n",
      "1396306800.0\n",
      "1398898799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-232198831.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-4.nc\n",
      "1398898800.0\n",
      "1401577199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_157093686.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-5.nc\n",
      "1401577200.0\n",
      "1404169199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_174482065.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-6.nc\n",
      "1404169200.0\n",
      "1406847599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_291098006.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-7.nc\n",
      "1406847600.0\n",
      "1409525999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1316348427.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-8.nc\n",
      "1409526000.0\n",
      "1412117999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_4048465.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-9.nc\n",
      "1412118000.0\n",
      "1414799999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-669066968.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-10.nc\n",
      "1414800000.0\n",
      "1417391999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_876889947.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-11.nc\n",
      "1417392000.0\n",
      "1420070399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1211871946.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2014-12.nc\n",
      "1420070400.0\n",
      "1422748799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_494082977.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-1.nc\n",
      "1422748800.0\n",
      "1425167999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1130334215.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-2.nc\n",
      "1425168000.0\n",
      "1427842799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-82224690.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-3.nc\n",
      "1427842800.0\n",
      "1430434799.0\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data/puma1/scratch/malard/export/antarctic_tdx_593592764.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-4.nc\n",
      "1430434800.0\n",
      "1433113199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_779596918.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-5.nc\n",
      "1433113200.0\n",
      "1435705199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1674332644.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-6.nc\n",
      "1435705200.0\n",
      "1438383599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-671497184.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-7.nc\n",
      "1438383600.0\n",
      "1441061999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-2019957482.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-8.nc\n",
      "1441062000.0\n",
      "1443653999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_1067404881.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-9.nc\n",
      "1443654000.0\n",
      "1446335999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-855412440.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-10.nc\n",
      "1446336000.0\n",
      "1448927999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1567528655.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-11.nc\n",
      "1448928000.0\n",
      "1451606399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1384585706.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2015-12.nc\n",
      "1451606400.0\n",
      "1454284799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2134002080.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-1.nc\n",
      "1454284800.0\n",
      "1456790399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1775261417.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-2.nc\n",
      "1456790400.0\n",
      "1459465199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-55901191.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-3.nc\n",
      "1459465200.0\n",
      "1462057199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_684830524.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-4.nc\n",
      "1462057200.0\n",
      "1464735599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_2047771094.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-5.nc\n",
      "1464735600.0\n",
      "1467327599.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-919890255.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-6.nc\n",
      "1467327600.0\n",
      "1470005999.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_338355286.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-7.nc\n",
      "1470006000.0\n",
      "1472684399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-999595029.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-8.nc\n",
      "1472684400.0\n",
      "1475276399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-598724623.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-9.nc\n",
      "1475276400.0\n",
      "1477958399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-815479426.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-10.nc\n",
      "1477958400.0\n",
      "1480550399.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_-1063981391.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-11.nc\n",
      "1480550400.0\n",
      "1483228799.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_963365014.nc\n",
      "/data/puma1/scratch/malard/export/Siple_2016-12.nc\n",
      "1262304000.0\n",
      "1264982399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-1\n",
      "1264982400.0\n",
      "1267401599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-2\n",
      "1267401600.0\n",
      "1270076399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-3\n",
      "1270076400.0\n",
      "1272668399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-4\n",
      "1272668400.0\n",
      "1275346799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-5\n",
      "1275346800.0\n",
      "1277938799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-6\n",
      "1277938800.0\n",
      "1280617199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-7\n",
      "1280617200.0\n",
      "1283295599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-8\n",
      "1283295600.0\n",
      "1285887599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-9\n",
      "1285887600.0\n",
      "1288569599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-10\n",
      "1288569600.0\n",
      "1291161599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-11\n",
      "1291161600.0\n",
      "1293839999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2010-12\n",
      "1293840000.0\n",
      "1296518399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-1\n",
      "1296518400.0\n",
      "1298937599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-2\n",
      "1298937600.0\n",
      "1301612399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-3\n",
      "1301612400.0\n",
      "1304204399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-4\n",
      "1304204400.0\n",
      "1306882799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-5\n",
      "1306882800.0\n",
      "1309474799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-6\n",
      "1309474800.0\n",
      "1312153199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-7\n",
      "1312153200.0\n",
      "1314831599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-8\n",
      "1314831600.0\n",
      "1317423599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-9\n",
      "1317423600.0\n",
      "1320105599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-10\n",
      "1320105600.0\n",
      "1322697599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-11\n",
      "1322697600.0\n",
      "1325375999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2011-12\n",
      "1325376000.0\n",
      "1328054399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-1\n",
      "1328054400.0\n",
      "1330559999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-2\n",
      "1330560000.0\n",
      "1333234799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-3\n",
      "1333234800.0\n",
      "1335826799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-4\n",
      "1335826800.0\n",
      "1338505199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-5\n",
      "1338505200.0\n",
      "1341097199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-6\n",
      "1341097200.0\n",
      "1343775599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-7\n",
      "1343775600.0\n",
      "1346453999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-8\n",
      "1346454000.0\n",
      "1349045999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-9\n",
      "1349046000.0\n",
      "1351727999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-10\n",
      "1351728000.0\n",
      "1354319999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-11\n",
      "1354320000.0\n",
      "1356998399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2012-12\n",
      "1356998400.0\n",
      "1359676799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-1\n",
      "1359676800.0\n",
      "1362095999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-2\n",
      "1362096000.0\n",
      "1364770799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-3\n",
      "1364770800.0\n",
      "1367362799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-4\n",
      "1367362800.0\n",
      "1370041199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-5\n",
      "1370041200.0\n",
      "1372633199.0\n",
      "/data/puma1/scratch/malard/export/antarctic_tdx_125882281.nc\n",
      "/data/puma1/scratch/malard/export/Wingham_2013-6.nc\n",
      "1372633200.0\n",
      "1375311599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-7\n",
      "1375311600.0\n",
      "1377989999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-8\n",
      "1377990000.0\n",
      "1380581999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-9\n",
      "1380582000.0\n",
      "1383263999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-10\n",
      "1383264000.0\n",
      "1385855999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-11\n",
      "1385856000.0\n",
      "1388534399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2013-12\n",
      "1388534400.0\n",
      "1391212799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-1\n",
      "1391212800.0\n",
      "1393631999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-2\n",
      "1393632000.0\n",
      "1396306799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-3\n",
      "1396306800.0\n",
      "1398898799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-4\n",
      "1398898800.0\n",
      "1401577199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-5\n",
      "1401577200.0\n",
      "1404169199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-6\n",
      "1404169200.0\n",
      "1406847599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-7\n",
      "1406847600.0\n",
      "1409525999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-8\n",
      "1409526000.0\n",
      "1412117999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-9\n",
      "1412118000.0\n",
      "1414799999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-10\n",
      "1414800000.0\n",
      "1417391999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-11\n",
      "1417392000.0\n",
      "1420070399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2014-12\n",
      "1420070400.0\n",
      "1422748799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-1\n",
      "1422748800.0\n",
      "1425167999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-2\n",
      "1425168000.0\n",
      "1427842799.0\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-3\n",
      "1427842800.0\n",
      "1430434799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-4\n",
      "1430434800.0\n",
      "1433113199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-5\n",
      "1433113200.0\n",
      "1435705199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-6\n",
      "1435705200.0\n",
      "1438383599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-7\n",
      "1438383600.0\n",
      "1441061999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-8\n",
      "1441062000.0\n",
      "1443653999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-9\n",
      "1443654000.0\n",
      "1446335999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-10\n",
      "1446336000.0\n",
      "1448927999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-11\n",
      "1448928000.0\n",
      "1451606399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2015-12\n",
      "1451606400.0\n",
      "1454284799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-1\n",
      "1454284800.0\n",
      "1456790399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-2\n",
      "1456790400.0\n",
      "1459465199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-3\n",
      "1459465200.0\n",
      "1462057199.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-4\n",
      "1462057200.0\n",
      "1464735599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-5\n",
      "1464735600.0\n",
      "1467327599.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-6\n",
      "1467327600.0\n",
      "1470005999.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-7\n",
      "1470006000.0\n",
      "1472684399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-8\n",
      "1472684400.0\n",
      "1475276399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-9\n",
      "1475276400.0\n",
      "1477958399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-10\n",
      "1477958400.0\n",
      "1480550399.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-11\n",
      "1480550400.0\n",
      "1483228799.0\n",
      "Error: Empty resultset.\n",
      "Wingham has no results for: 2016-12\n"
     ]
    }
   ],
   "source": [
    "from datetime import timedelta\n",
    "from dateutil.relativedelta import *\n",
    "import os\n",
    "years = range(2010,2017)\n",
    "months= range(1,13)\n",
    "columns = ['lat','lon','x','y','elev','heading','demDiff','demDiffMad','wf_number','sampleNb','power','powerdB','phase','phaseS','coh','time']\n",
    "path = '/data/puma1/scratch/malard/export/'\n",
    "\n",
    "def extractDataByMonth(path,name,years,months,columns,minX,maxX,minY,maxY):\n",
    "    for y in years:\n",
    "        for m in months:\n",
    "            startTime=datetime(y,m,1,0,0)\n",
    "            endTime=startTime+relativedelta(months=+1)-timedelta(seconds=1)\n",
    "            fileName = query.executeQuery( 'antarctic','tdx',minX,maxX,minY,maxY,startTime,endTime,columns,[])\n",
    "            print(fileName)\n",
    "            newName = path+name+'_'+str(y)+'-'+str(m)+'.nc'\n",
    "            if fileName != 'Error: Empty resultset.':\n",
    "                os.rename(fileName,newName)\n",
    "                print(newName)\n",
    "            else:\n",
    "                print( name + ' has no results for: ' + str(y) +'-' + str(m) )\n",
    "            \n",
    "extractDataByMonth(path,'Thwaites',years,months,columns,-1.64E+06,-1.26E+06,-7.59E+05,-3.08E+05)\n",
    "\n",
    "extractDataByMonth(path,'Amery',years,months,columns,1.34E+06,1.86E+06,3.98E+05,1.03E+06)\n",
    "\n",
    "minX= 8.40E+05\n",
    "maxX= 1.67E+06\n",
    "minY= -2.16E+06\n",
    "maxY= -1.36E+06\n",
    "\n",
    "extractDataByMonth(path,'Cook',years,months,columns,minX,maxX,minY,maxY)\n",
    "\n",
    "#SIPLE\n",
    "minX=-6.53E+05\n",
    "maxX=6.96E+04\n",
    "minY=-8.71E+05\n",
    "maxY=-1.60E+05\n",
    "\n",
    "extractDataByMonth(path,'Siple',years,months,columns,minX,maxX,minY,maxY)\n",
    "\n",
    "#wingham\n",
    "minX=1.01E+06\n",
    "maxX=1.27E+06\n",
    "minY=-1.20E+06\n",
    "maxY=-1.04E+06\n",
    "\n",
    "\n",
    "extractDataByMonth(path,'Wingham',years,months,columns,minX,maxX,minY,maxY)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{\"shardName\":\"/data/snail1/scratch//antarctic/tdx/swath/y2013/m6/cell_APS_1000000_-1200000/GridCell_0.nc\",\"minX\":1000062.7074885394,\"maxX\":1005207.1424866923,\"minY\":-1199366.085353272,\"maxY\":-1195230.5445922224,\"minT\":1370691676000,\"maxT\":1370691676000,\"numberOfPoints\":54},{\"shardName\":\"/data/snail1/scratch//antarctic/tdx/swath/y2013/m6/cell_APS_1200000_-1200000/GridCell_0.nc\",\"minX\":1200008.3261341034,\"maxX\":1277136.9510460454,\"minY\":-1199997.3946955919,\"maxY\":-1100497.6018679007,\"minT\":1370387870000,\"maxT\":1370733172000,\"numberOfPoints\":15591},{\"shardName\":\"/data/snail1/scratch//antarctic/tdx/swath/y2013/m6/cell_APS_1100000_-1200000/GridCell_0.nc\",\"minX\":1131124.9819992413,\"maxX\":1199986.718400437,\"minY\":-1192250.3568485035,\"maxY\":-1100000.2336050712,\"minT\":1370387870000,\"maxT\":1370733172000,\"numberOfPoints\":13880},{\"shardName\":\"/data/snail1/scratch//antarctic/tdx/swath/y2013/m6/cell_APS_1100000_-1100000/GridCell_0.nc\",\"minX\":1100004.335853635,\"maxX\":1199996.425638942,\"minY\":-1099999.9516929733,\"maxY\":-1000007.6739745027,\"minT\":1370262797000,\"maxT\":1370733172000,\"numberOfPoints\":19044},{\"shardName\":\"/data/snail1/scratch//antarctic/tdx/swath/y2013/m6/cell_APS_1200000_-1100000/GridCell_0.nc\",\"minX\":1200003.0484035665,\"maxX\":1299997.6565956313,\"minY\":-1099920.4834400574,\"maxY\":-1000001.1784739237,\"minT\":1370262797000,\"maxT\":1370733172000,\"numberOfPoints\":24906},{\"shardName\":\"/data/snail1/scratch//antarctic/tdx/swath/y2013/m6/cell_APS_1000000_-1100000/GridCell_0.nc\",\"minX\":1057572.3344095906,\"maxX\":1099999.7203024158,\"minY\":-1057591.8994053376,\"maxY\":-1000000.9009869131,\"minT\":1370387870000,\"maxT\":1370560521000,\"numberOfPoints\":5934}]\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "#wingham\n",
    "minX=1.01E+06\n",
    "maxX=1.27E+06\n",
    "minY=-1.20E+06\n",
    "maxY=-1.04E+06\n",
    "minT = datetime(2010,12,1,0,0)\n",
    "maxT = datetime(2016,12,31,23,59)\n",
    "\n",
    "\n",
    "gcs = query.getShards( 'antarctic','tdx',minX,maxX,minY,maxY,minT,maxT )\n",
    "\n",
    "print(gcs)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
